﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="UpdateTrustRegion.aspx.cs" Inherits="SD.UI.UpdateTrustRegion" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style2
        {
            height: 23px;
        }
        .style3
        {
            width: 156px;
        }
        .style4
        {
            height: 23px;
            width: 156px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <table width="100%">
            <tr>
                <td colspan="2">
                    <div>
                        <h1>
                            Trust Region Details
                        </h1>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div style="float: right; margin-bottom: -30px;">
                        <asp:Button ID="btnMSInActive" runat="server" Text="In-active" CausesValidation="False"
                            OnClick="btnMSInActive_Click" CssClass="Button" />
                        <asp:Button ID="btnMSSave" runat="server" Text="Save" OnClick="btnSMSave_Click" CssClass="Button" />
                        <asp:Button ID="btnMSBack" runat="server" Text="Back" OnClick="btnSMBack_Click" CausesValidation="False"
                            CssClass="Button" />
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div>
                        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                        </asp:ToolkitScriptManager>
                        <div>
                            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
                                OnActiveTabChanged="TabContainer1_ActiveTabChanged">
                                <asp:TabPanel ID="tabDetails" runat="server" HeaderText="Details">
                                    <ContentTemplate>
                                        <div>
                                            <asp:Panel ID="PanelDetails" runat="server" Width="1180px">
                                                <div>
                                                    <table width="100%">
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblCountry" runat="server" Text="Country" />
                                                                <asp:Label ID="lblCountryRequired" runat="server" ForeColor="Red" Text="*" />
                                                            </td>
                                                            <td colspan="3">
                                                                <asp:DropDownList ID="ddlCountry" runat="server" Width="250px" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="style3">
                                                                <asp:Label ID="lblName" runat="server" Text="Trust Region Name" />
                                                                <asp:Label ID="lblNameRequired" runat="server" ForeColor="Red" Text="*" />
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="tbxName" runat="server" Width="250px" MaxLength="50" />
                                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxName"
                                                                    ErrorMessage="Trust region name is required" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lbDescription" runat="server" Text="Description" />
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="tbxDescription" runat="server" TextMode="MultiLine" Width="250px"
                                                                    Height="90px" />
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="style3">
                                                                <asp:ValidationSummary ID="ValidationSummary2" runat="server" Width="155px" />
                                                            </td>
                                                            <td colspan="3">
                                                                &#160;
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="tabTrustDistricts" runat="server" HeaderText="Trust Districts">
                                    <ContentTemplate>
                                        <div>
                                            <asp:Panel ID="PanelTrustDisctrictList" runat="server">
                                                <div>
                                                    <table width="100%">                                                        
                                                        <tr>
                                                            <td>
                                                                <div id="menu">
                                                                    <p>
                                                                        <asp:LinkButton ID="lbnAll" runat="server" Text="All" OnClick="lbnAll_Click" />
                                                                    </p>
                                                                    |<p>
                                                                        <asp:LinkButton ID="lbn09" runat="server" OnClick="lbn09_Click" Text="0-9" />
                                                                    </p>
                                                                    |<p>
                                                                        <asp:LinkButton ID="lbnABCDE" runat="server" OnClick="lbnABCDE_Click" Text="A B C D E" />
                                                                    </p>
                                                                    |<p>
                                                                        <asp:LinkButton ID="lbnFGHIJ" runat="server" OnClick="lbnFGHIJ_Click" Text="F G H I J" />
                                                                    </p>
                                                                    |<p>
                                                                        <asp:LinkButton ID="lbnKLMN" runat="server" OnClick="lbnKLMN_Click" Text="K L M N" />
                                                                    </p>
                                                                    |<p>
                                                                        <asp:LinkButton ID="lbnOPQR" runat="server" OnClick="lbnOPQR_Click" Text="O P Q R" />
                                                                    </p>
                                                                    |<p>
                                                                        <asp:LinkButton ID="lbnSTUV" runat="server" OnClick="lbnSTUV_Click" Text="S T U V" />
                                                                    </p>
                                                                    |<p>
                                                                        <asp:LinkButton ID="lbnWXYZ" runat="server" OnClick="lbnWXYZ_Click" Text="W X Y Z" />
                                                                    </p>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <div style="float: right">
                                                                    <asp:Button ID="btnCreate" runat="server" Text="Create" OnClick="btnCreate_Click"
                                                                        CssClass="Button" />
                                                                    <asp:CheckBox ID="chkInActive" runat="server" Text="Include In-Active" Checked="false"
                                                                        OnCheckedChanged="chkInActive_CheckedChanged" AutoPostBack="True" />
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2" align="center">
                                                                <div>
                                                                    <asp:GridView ID="gvTrustDistrictList" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                                                                        AllowSorting="True" OnPageIndexChanging="gvOrganizationList_PageIndexChanging"
                                                                        OnSorting="gvOrganizationList_Sorting" PageSize="15" DataKeyNames="OrgId" OnSelectedIndexChanged="gvOrganizationList_SelectedIndexChanged"
                                                                        EmptyDataText="Don't have data in system." Width="100%" CellPadding="3" BackColor="White"
                                                                        BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CssClass="Org">
                                                                        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                                                                        <EmptyDataRowStyle BorderStyle="None" Wrap="False" />
                                                                        <Columns>
                                                                            <asp:BoundField DataField="TrustDistrictID" Visible="False" />
                                                                            <asp:TemplateField HeaderText="District Name" SortExpression="Name">
                                                                                <ItemTemplate>
                                                                                    <a href="#" onclick="onTrustDistrictClick(this);">
                                                                                        <%#DataBinder.Eval(Container.DataItem,"Name") %></a>
                                                                                    <asp:HiddenField ID="hdregId" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"TrustDistrictId") %>' />
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                            <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
                                                                            <asp:BoundField HeaderText="Region" DataField="Region" SortExpression="Region" />
                                                                            <asp:BoundField HeaderText="Is Active?" DataField="IsActive" SortExpression="IsActive" />
                                                                        </Columns>
                                                                        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                                                                        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                                                                        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                                                                        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                                                                        <AlternatingRowStyle BackColor="#F7F7F7" />
                                                                    </asp:GridView>
                                                                    <br />
                                                                    <asp:Label ID="lblMessage" runat="server" Text="" ForeColor="Red" />
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                            </asp:TabContainer>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
